#if !defined(__DOORBELL_MQTT_H__)
#define __DOORBELL_MQTT_H__

#define MQTT_SERVER "ws://192.168.19.10:1883"
#define MQTT_CLIENT_ID "71e48986-1ac2-4de1-8565-0b58c334e6d5"
#define MQTT_PUSH_TOPIC "doorbell/data"
#define MQTT_PULL_TOPIC "doorbell/cmd"

typedef struct
{
    char cmd[16];
    void (*cb)(void *);
    void *arg;
} doorbell_mqtt_cmd_cb;

void doorbell_mqtt_init(void);

void doorbell_mqtt_publish(const char *message, int len);

void doorbell_mqtt_register_callback(doorbell_mqtt_cmd_cb *cb);

void doorbell_mqtt_deinit();

#endif // __DOORBELL_MQTT_H__
